package com.wpl.controller;

import com.wpl.bean.Teacher;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class TeacherController {

    @GetMapping("/listTeacher")
    public Object getInfo() {

        System.out.println("触发");
        List<Teacher> list = new ArrayList<>();
        Teacher teacher1 = new Teacher();
        teacher1.setId(10);
        teacher1.setName("宿宿");
        teacher1.setGender("men");
        Teacher teacher2 = new Teacher();
        teacher2.setId(65);
        teacher2.setName("kang");
        teacher2.setGender("women");
        list.add(teacher1);
        list.add(teacher2);


        return list ;
    }
}
